package com.spring.bus.socket_client;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

@SpringBootApplication
public class SocketClientApplication {

    private static final ExecutorService executorService = Executors.newFixedThreadPool(5);

    private static String host = "127.0.0.1";

    private static int port = 8085;

    public static void main(String[] args) {
        SpringApplication.run(SocketClientApplication.class, args);

        //心跳
        executorService.execute(new ClientHeartThread(host,port));
        //业务
        executorService.execute(new ClientPrintThread(host,port));
    }

}
